package com.study.crud.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.study.crud.model.user.User;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface UserMapper extends BaseMapper<User> {

    //@Select("select * from user where jid=#{jid}")    要进行条件查询     查询本部门
    List<User> findListBy4(String uname);

    //查询全部
    List<User> findAll(User user);

    @Select("select count(uid) from user where eid=#{eid}")
    Integer findNumByEid(Integer eid);

    @Select("select count(uid) from user where jid=#{jid}")
    Integer findNumByJid(Integer jid);

    //List<UserDto> selectAll();

    //@Select("select * from user where uid=#{userId}")
    //UserDto getUserDtoById(Integer userId);
}
